package com.sunshine.lnuplus.viewModel

import android.app.Application
import android.content.Context
import com.sunshine.lnuplus.base.BaseViewModel
import com.sunshine.lnuplus.model.room.Lesson
import com.sunshine.lnuplus.model.room.TimetableRepository

class MeViewModel(application: Application) : BaseViewModel(application) {

    private val appSetting = application.getSharedPreferences("com.sunshine.lnuplus_preferences", Context.MODE_PRIVATE)
    val repository = TimetableRepository(application)

    fun getUser(): String? {
        return appSetting.getString("user_no", "")
    }

    fun getAllLesson() : List<Lesson> {
        return repository.getLesson()
    }

}
